package com.ygqh.baby.mapper;

import com.ygqh.baby.ao.ContractStatus;
import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.po.AdminContract;
import com.ygqh.baby.po.AdminContractExample;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface AdminContractMapper {
    int countByExample(AdminContractExample example);

    int deleteByExample(AdminContractExample example);

    int deleteByPrimaryKey(Long id);

    int insert(AdminContract record);

    int insertSelective(AdminContract record);

    List<AdminContract> selectByExampleWithBLOBs(AdminContractExample example);

    List<AdminContract> selectByExample(AdminContractExample example);

    AdminContract selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") AdminContract record, @Param("example") AdminContractExample example);

    int updateByExampleWithBLOBs(@Param("record") AdminContract record, @Param("example") AdminContractExample example);

    int updateByExample(@Param("record") AdminContract record, @Param("example") AdminContractExample example);

    int updateByPrimaryKeySelective(AdminContract record);

    int updateByPrimaryKeyWithBLOBs(AdminContract record);

    int updateByPrimaryKey(AdminContract record);
    int countSuper(@Param("q") String q, @Param("contractStatus") ContractStatus contractStatus, @Param("startDate") Date startDate,
                   @Param("endDate")Date endDate, @Param("contractType")String contractType,@Param("productName")String productName,
                   @Param("contractCode")String contractCode, @Param("skuCode") String skuCode);
    
    List<AdminContract> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("q") String q,
                                    @Param("contractStatus") ContractStatus contractStatus, @Param("startDate") Date startDate,
                                    @Param("endDate")Date endDate,@Param("contractType")String contractType,
                                    @Param("productName")String productName, @Param("contractCode")String contractCode,
                                    @Param("skuCode") String skuCode);

    AdminContract findDetailById(@Param("id")Long id);
    List<AdminContract> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param ("q") String q);
    
    List<Map<String,Object>> selectContractSettlement(@Param("queryInfo") QueryInfo queryInfo, @Param ("contractCode") String contractCode,@Param ("supplierName") String supplierName,@Param ("contractStatus") String contractStatus);
    int countSettlement ( @Param ("contractCode") String contractCode,@Param ("supplierName") String supplierName,@Param ("contractStatus") String contractStatus);

	String findContractCode(@Param ("frameCode") String frameCode);


}